
cgCheck = () -> (
     
     R = QQ[a,b,c,e,f,m, x,y,z,t, Degrees=>{0,0,0,0,0,0,1,1,1,1}]; -- Ring of homogeneous coordinates.
     
     quintic = (x+m*y+a*z)^2*t^3+(a^2*x^3+x*y*(b*x+c*y)+m^2*y^3+(e*x^2+f*x*y+c*y^2)*z+(b*x+e*y)*z^2+z^3)*t^2+(2*a*x^3*y+e*x^2*y^2+2*a*m*x*y^3+(2*a*m*x^3+f*x^2*y+f*x*y^2+2*m*y^3)*z+(c*x^2+f*x*y+b*y^2)*z^2+2*(m*x+a*y)*z^3)*t+x^3*y^2+a^2*x^2*y^3+x*y*z*(2*m*x^2+b*x*y+2*a*y^2)+z^2*(m^2*x^3+c*x^2*y+e*x*y^2+y^3)+(m*x+a*y)^2*z^3;
     myquintic = sub(quintic, {t=>1, x=>x-m*y-a*z}); -- dehomogenize and make quadratic part square of linear term.
     
     q3 = part(3, sub(myquintic, x=>0));
     
     alpha = diff(y^3, q3)/6;

     g1 = diff(z^3,q3)/6;
     g2 = diff(z*y^2, q3)/2;     
     g3 = diff(y*z^2, q3)/2;

       
     blowup = sub(sub(myquintic,{x=>x*z,y=>y*z})/z^2,R); -- Blowup in the direction of z.
       
     f2 = part(2,blowup); -- Quadratic part after the blowup.
     f3 = part(3,blowup); -- Cubic part after the blowup.
     
     g4 = -((diff(x*z,f2))^2 - (diff(x^2,f2))*(diff(z^2,f2)));
          
     mu = diff(x*z, f2)/2;
     
     ff2 = sub(f2, x => -mu*z);
     ff2 = ff2*4;
     
     ff3 = sub(f3, x => -mu*z);
     ff3 = ff3*4;
     
     gg5 = (-1)*(diff(z^3, ff3)/6);
     
     g5 = (gg5 + 3*g4*a^3 - g4*e)/4;
     
     g6 = diff(y*z^2,ff3)/4;
         
    )

--cg1 = -3*a^3*m^2 + 2*a*b*m + e*m^2 - a*c - f*m + c;
--cg2 = -3*a^4*m + a^2*b + 2*a*e*m - a*f - b*m + e;
--cg3 = -a^5 + a^2*e - a*b + 1;
--cg4 = -6*a^4*b + 4*a^2*c + 12*a^5*e - b^2 + 4*a*b*e - 4*a^2*e^2 - 8*a*m - 8*a^4*m - 9*a^8; 
--cg5 = m*b + 3*a^3*m*b - a*b*c + a^2*c*e - 4*a^4*m*e - a^2*m^2 + a^3*m^2 - 3*a^4*m + 3*a^7*m;
--cg6 = -6*a^3*m*b + 6*a^5*b + 4*a*m*c + 18*a^4*m*e - 2*a*f + 2*a^2*f - 3*a^4*f + 2*a*b^2 + 2*m*b*e - 4*a^2*b*e - b*f + 2*a*e*f - 4*a*m*e^2 + 4*a - 12*a^3*m^2 - 18*a^7*m - 4*a^4 - 4*m^2;

--wtf5 = -27*a^11 + 36*a^8*c + 9*a^8*e - 18*a^7*b - 36*a^7*m - 12*a^5*c^2 - 12*a^5*c*e + 12*a^5*c + 12*a^4*b*c + 6*a^4*b*e + 24*a^4*c*m - 3*a^3*b^2 + 4*a^2*c^2*e - 12*a^4*m - 12*a^3*b*m - 4*a^3*m^2 - 8*a^2*c^2 - 4*a*b*c*e + 4*a^2*m^2 + 4*a*b*c + b^2*e + 8*a*c*m - 4*b*m;
     